﻿using System;
using Dimebrain.TweetSharp.Core.Attributes;
using Dimebrain.TweetSharp.Core.Web.Query;

namespace Dimebrain.TweetSharp
{
#if(!SILVERLIGHT)
    ///<summary>
    /// This class provides meta-data for your specific Twitter application, that is
    /// used to identify your client to Twitter, store OAuth credentials for all future
    /// request, and in some cases define a transparent proxy to redirect API calls to.
    ///</summary>
    [Serializable]
#endif
    public class TwitterClientInfo : IWebQueryInfo
    {
        /// <summary>
        /// This is the name of your client application. It is used to
        /// identify your client when a user updates their status, or when
        /// your application makes a Twitter Search API request.
        /// </summary>
        [UserAgent, Header("X-Twitter-Client")]
        public string ClientName { get; set; }

        /// <summary>
        /// This is the version of your application. This is meta-data only,
        /// and not used by Twitter for client processing.
        /// </summary>
        [Header("X-Twitter-Version")]
        public string ClientVersion { get; set; }

        /// <summary>
        /// This is the URL of your application. This is meta-data only,
        /// and not used by Twitter for client processing. Your application's URL
        /// is stored by Twitter when you apply for a 'Source' attribute or register
        /// your application for OAuth.
        /// </summary>
        [Header("X-Twitter-URL")]
        public string ClientUrl { get; set; }

        /// <summary>
        /// If your client is using OAuth authentication, this value should be set
        /// to the value of your consumer key. This avoids having to provide the key
        /// in every query.
        /// </summary>
        public string ConsumerKey { get; set; }

        /// <summary>
        /// If your client is using OAuth authentication, this value should be set
        /// to the value of your consumer secret. This avoids having to provide the secret
        /// in every query.
        /// </summary>
        public string ConsumerSecret { get; set; }

#if SILVERLIGHT
        /// <summary>
        /// Since you are communicating from the client-side, this value should point to a 
        /// proxy that is configured to work transparently (API methods are identical other
        /// than the domain), allow cross-domain access, and understand TweetSharp custom 
        /// headers.
        /// </summary>
        public string TransparentProxy { get; set;}
#endif
    }
}